package com.paopao.System.server;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.paopao.System.dao.LogDao;
import com.paopao.System.pojo.Log;

@Service("logServer")
public class LogServerImpl implements LogServer
{

	@Autowired
	private LogDao logDao;
	@Override
	public Integer addLog(Log log)
	{
		return logDao.addLog(log);
	}
	@Cacheable("findUser") 
	@Override
	public List<Log> query()
	{
		return logDao.query();
	}
	@Override
  @CacheEvict(value= {"findUser"},allEntries=true)//清空缓存，allEntries变量表示所有对象的缓存都清除
	public Integer deleteAll()
	{
		return logDao.deleteALL();
	}

}
